import http from '../utils/http'
export const AddtoCartApi = ({ goodsId, count, ...data }) =>
  http.get(`/cart/addToCart/${goodsId}/${count}`, data)

export const getCartListApi = () => http.get('/cart/getCartList')

export const updateCheckCartApi = ( goodsId, isChecked ) => {
  return http.get(`/cart/checkCart/${goodsId}/${isChecked}`)
}

export const CheckAllApi = (isChecked) =>
  http.get(`/cart/checkAllCart/${isChecked}`)

export const DelCartApi = (goodsId) => http.get(`/cart/delete/${goodsId}`)
